package dapps.web.monitor;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ActionSupport;

import dapps.entity.monitor.Fieldvalue;
import dapps.service.monitor.MonitorManager;

@SuppressWarnings("serial")
public class StaticsotherAction extends ActionSupport {

	@Autowired
	private MonitorManager mManager;

	// private HttpServletRequest request = Struts2Utils.getRequest();

	private List<Fieldvalue> splist;
	private String reportDate;
	private String field;
	private String fieldother;
	private String otherno;
	private String otherrank;
	private Long typeid;
	private Long districtid;

	@Override
	public String execute() throws Exception {
		String []fields = {field,fieldother};
		if(districtid!=null)
		splist = mManager.getStaticsOthers(reportDate, fields, otherno,
				otherrank,typeid,districtid);
		return SUCCESS;
	}

	public List<Fieldvalue> getSplist() {
		return splist;
	}

	public void setSplist(List<Fieldvalue> splist) {
		this.splist = splist;
	}

	public String getField() {
		return field;
	}

	public void setField(String field) {
		this.field = field;
	}

	public String getOtherno() {
		return otherno;
	}

	public void setOtherno(String otherno) {
		this.otherno = otherno;
	}

	public String getOtherrank() {
		return otherrank;
	}

	public void setOtherrank(String otherrank) {
		this.otherrank = otherrank;
	}

	public String getReportDate() {
		return reportDate;
	}

	public void setReportDate(String reportDate) {
		this.reportDate = reportDate;
	}

	public String getFieldother() {
		return fieldother;
	}

	public void setFieldother(String fieldother) {
		this.fieldother = fieldother;
	}

	public Long getTypeid() {
		return typeid;
	}

	public void setTypeid(Long typeid) {
		this.typeid = typeid;
	}

	public Long getDistrictid() {
		return districtid;
	}

	public void setDistrictid(Long districtid) {
		this.districtid = districtid;
	}

}
